Skip to content

fix(plugin-sharing)!: a share granted directly by a non-system caller is always a manual share - #34031

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/direct-share-grant-is-manual
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/direct-share-grant-is-manual

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no page under skills/** teaches the direct-grant door or its source / sourceId fields; the rule is stated in content/docs/kernel/runtime-services/sharing-service.mdx.

维护者速读

  • 改了什么:非系统调用方直接授予的记录共享一律是手动共享;grant 对非 'manual' 的 source 或任何 sourceId 返回 400 VALIDATION_FAILED,不读不写。
  • 为什么改:规则、团队与系统来源的共享只应由平台自身路径(系统上下文)写入,直接授权入口不应接受调用方自选来源。
  • 风险与回滚:曾在直接授权请求里带非手动 source 或 sourceId 的客户端改收 400(BREAKING,changeset 写明迁移);系统路径与撤销规则不变;回滚即还原本 PR。
  • 先看:packages/plugins/plugin-sharing/src/sharing-service.ts(assertDirectGrantIsManual 及其在 grant 非系统分支的调用点),packages/plugins/plugin-sharing/src/sharing-service.test.ts(新 describe),packages/qa/dogfood/test/direct-share-grant-is-manual.dogfood.test.ts。
  • 两分钟验证:pnpm --filter @objectstack/plugin-sharing exec vitest run src/sharing-service.test.ts -t "a direct grant is always a manual share",预期 14 个用例全绿。
  • 需要你做的:无,席位落地。

What changes

A share a non-system caller grants is always a manual share.

  • SharingService.grant, on the non-system path only, refuses an input whose source is present and is not 'manual', and an input that carries any sourceId, with VALIDATION_FAILED (REST 400) and a rule-level message. It refuses rather than rewrites, so a caller that sent a source learns it was not honoured. The check runs ahead of the authorization pre-flight, before anything is read or written.
  • An absent source (undefined / null), or an explicit 'manual' with no sourceId, is unchanged. The system path is unchanged.
  • POST /api/v1/data/:object/:id/shares is covered by the service rule as is; packages/rest is not edited.
  • Docs: one rule sentence in content/docs/kernel/runtime-services/sharing-service.mdx (Management authority).
  • Changeset: @objectstack/plugin-sharing patch, !, BREAKING with Who moves, ADR-0087 not-required (no-migration-prescription).

Tests

  • plugin-sharing/src/sharing-service.test.ts, new top-level describe "a direct grant is always a manual share": refused for a non-system caller with source 'rule' (with and without a sourceId), 'team', 'inherited', an unknown string, an empty string, a sourceId with no source and a sourceId with 'manual', each asserting VALIDATION_FAILED, no row and zero engine reads; the same for a caller without manage-shares rights. CONTROLS: no source, null source and sourceId, explicit 'manual' (and its revoke), the system context writing a rule share with its sourceId, and the CONFLICT on a non-system revoke of that rule share.
  • Two tests from the "no inert grants" suite that pinned a non-system grant carrying sourceId (and a non-manual source) were removed: they pinned the accepting branch this rule removes; a comment points to the new suite.
  • qa/dogfood/test/direct-share-grant-is-manual.dogfood.test.ts (shared-showcase project): through the real REST door on the booted showcase, six refused shapes each answer 400 with nested error.code VALIDATION_FAILED and write no sys_record_share row; controls for no source (201, then the owner's DELETE 204), explicit 'manual' (201), and a system-written rule share whose DELETE through the door is still 409 CONFLICT; and the generic data door on sys_record_share refusing the caller's create (405, no row).
  • The rule evaluator's reconcile is unchanged and still materialises through grant under the system context: plugin-sharing/src/sharing-rule.test.ts and the rest of the package pass.

Acceptance notes

  • The dogfood file sits outside the two edited source files' directories because only the booted runtime composes the REST door with the real service; it is registered in the shared-showcase project (packages/qa/dogfood/vitest.config.ts, one line).
  • The client SDK's shares.grant options (packages/client/src/index.ts) still declare source? and sourceId?. After this rule only an absent source or 'manual' with no sourceId is accepted there; narrowing that type is a separate change in packages/client, not made here.

Verification

All readings below are on head 6e8e34751d (after merging origin/main), unless a line says otherwise.

Package tests and typecheck
  • pnpm --filter @objectstack/plugin-sharing test: exit 0, Test Files 74 passed (74), Tests 1537 passed (1537).
  • pnpm --filter @objectstack/plugin-sharing typecheck: exit 0 (includes check:test-typecheck: ledger held, 3 pinned signatures unchanged).
  • pnpm --filter @objectstack/dogfood typecheck: exit 0.
  • pnpm --filter @objectstack/spec check:generated: exit 0 (spec moved on main; nothing in this diff touches it).
  • packages/rest is not edited; its suite is left to CI.
Dogfood battery (narrowing arm), final head, under the verify lock
  • pnpm --filter @objectstack/dogfood test (no shard, no path): lock VERDICT command-exit 0; Test Files 468 passed, 3 skipped (471); Tests 3969 passed, 42 skipped (4011); no failures.
Ablation (one pass: remove the new check, rebuild, read, restore, rebuild, read)
  • Mutation through scripts/ablation-replace.mjs (anchor hit 1, then 0 on disk); scripts/ablation-dist-preflight.mjs --absent confirmed the check gone from plugin-sharing/dist.
  • Check removed: sharing-service.test.ts 9 failed / 159 passed (every refusal case red, every control green); the dogfood file 6 failed / 4 passed (every refusal case red, every control green).
  • Restored (git checkout HEAD, blob hash equal to HEAD, git diff HEAD empty), rebuilt, preflight confirmed the check back in dist: both suites green.
  • Taken at 76b6189b6a, before the merge; the rule code is unchanged since.
Gates
  • node scripts/pm/dispatch-gates.mjs --commands derived 100 families; all 100 run at the final head, every one exit 0; --ran reconciliation: 100 derived, 100 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero: every family recorded an exit code).
  • check:adr-0087-registration: 1 declared-breaking changeset, disposition not-required (no-migration-prescription).
  • The full lint workflow sweep and pnpm lint are CI's.

Generated by Claude Code

… is always a manual share

A non-system caller's grant refuses a source other than 'manual', and any
sourceId, with VALIDATION_FAILED before anything is read. Only the
platform's own sharing-rule, team and system paths write a share of another
source.

Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f
Co-authored-by: Claude <noreply@anthropic.com>
…e by status and code

Claude-Session: https://claude.ai/code/session_017xRBcT1w3zpekijraHJE4f
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the domain:server Domain lane — seat card indexed by label:pm:seat label Nov 15, 2026
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 12 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json b4ce310b88e902c3844f0a709ceb2e277939dc31 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 849edeb0bc3a2ccfecb46bde6b507287e53b9c91 — the merge of head 6e8e34751d43a724f0f529a225e69954cad46f5a into base b4ce310b88e902c3844f0a709ceb2e277939dc31, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 849edeb0bc3a2ccfecb46bde6b507287e53b9c91 && git checkout 849edeb0bc3a2ccfecb46bde6b507287e53b9c91
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b4ce310b88e902c3844f0a709ceb2e277939dc31 6e8e34751d43a724f0f529a225e69954cad46f5a && git checkout -B drift-repro b4ce310b88e902c3844f0a709ceb2e277939dc31 && git merge --no-ff 6e8e34751d43a724f0f529a225e69954cad46f5a

node scripts/docs-audit/affected-docs.mjs --json b4ce310b88e902c3844f0a709ceb2e277939dc31

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#1 · sunhaolin · session_017xRBcT1w3zpekijraHJE4f

Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (the maintainer routes contract-tier reviews to the review seat, 2026-11-15T16:48Z) · head 6e8e347

@objectstack-fleet objectstack-fleet Bot added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 6e8e347 · 2026-11-15T16:50Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6e8e34751d43a724f0f529a225e69954cad46f5a
Local-runs: none
Scope: packages/plugins/plugin-sharing/src/sharing-service.ts, packages/plugins/plugin-sharing/src/sharing-service.test.ts, packages/qa/dogfood/test/direct-share-grant-is-manual.dogfood.test.ts, packages/qa/dogfood/vitest.config.ts, .changeset/direct-share-grant-is-manual.md, content/docs/kernel/runtime-services/sharing-service.mdx + packages/rest/src/sharing-routes.ts, packages/plugins/plugin-sharing/src/sharing-rule-service.ts, packages/plugins/plugin-sharing/src/objects/sys-record-share.object.ts, packages/plugins/plugin-security/src/system-write-guard.ts, packages/spec/src/contracts/sharing-service.ts, packages/client/src/index.ts, docs/adr/0111-record-share-management-authority-and-verb-boundary.md (cited code outside the diff: read, not reviewed)

Read at 2026-11-15T17:36Z. First review of this head; claim: comment 6897925330; lane request 6897918264 on mailbox #33873. Independence: implemented and dispatched by security#1 (sunhaolin); reviewed by os-tesla. CI re-read by the seat after the last run completed: 67 runs, 41 success, 25 skipped, 1 cancelled (a superseded Check Changeset run; its other runs are green), none failed, none running.

① Derived judgments

The rule under review: a share of any kind other than manual exists only because a platform path running under a system context wrote it; a share a non-system caller grants is a manual share. Read against the tree at this head, door by door.

  • Service method. SharingService.grant applies the rule on its non-system branch, and the branch is chosen by context.isSystem alone, so a caller with no context, an owner, a holder of Modify All and a platform administrator all take it. The tree REFUSES (VALIDATION_FAILED); it does not coerce. The PR body, the changeset and the docs sentence all say refuse, and all three agree with the code.
  • REST route. POST /data/:object/:id/shares (packages/rest/src/sharing-routes.ts, plain and environment-scoped registration, one handler) is the only non-system caller of grant in the tree. It forwards both spellings of the second field, and the service judges what it forwards. The route file's own note that an inbound HTTP context never carries the system flag holds in the code read.
  • Update of an existing share. There is no separate update door: a repeated grant is the same method and passes the same check before the upsert is reached, so the update half is covered by the same refusal.
  • Generic data doors on the share object (create, update, delete, bulk, import). sys_record_share declares enable.apiMethods get and list only and managedBy: 'engine-owned'; neither is touched by this diff. The dogfood file pins the REST create at 405. Update, delete and the non-REST generic doors rest on those two pre-existing declarations and were read, not reviewed.
  • Actions, bulk or batch grant, seeds. A grep of the head for callers of grant and for writers of the share table finds none outside the REST route and the rule evaluator. Nothing in ui/, examples/ or apps/ sends either field on the grant door, so AGENTS.md Post-Task step 4 is not engaged.
  • System callers keep their kinds. The only system caller of grant is the rule evaluator (sharing-rule-service.ts), whose context is built from the service's system context; its branch is unchanged, and the control tests pin a system-written rule share with its source id, at the service and on the booted stack.
  • Readers of the kind. Revocation, the rule reconcile and sweep, the explain engine and the list views of the share object are not in the diff and read the stored kind exactly as before. No reader changes its answer because of this head. The one moved reading is already inside the declared FROM/TO: a non-system re-grant that named a non-manual kind is refused like a first grant.
  • Rows stored before this head. Left exactly as stored. The changeset says no stored row changes, which is true; see S1 for what it does not say.

Declaration, per AGENTS.md Post-Task step 3: both line-initial declarations are in the PR body and the changeset and agree (Clause-②: no (narrowing), Metadata-protocol: none); the title carries the bang; the changeset carries the BREAKING banner, who moves, FROM 201 TO 400, the one-line remedy, a Not-moved paragraph, and exactly one ADR-0087 disposition marker, not-required (no-migration-prescription), whose reasoning matches the diff (no schema key, export or stored shape moves). Complete for the narrowing itself.

Tests: the service suite pins eight refused shapes for an authorised caller and one for an unauthorised caller, each with no row and no read, plus five controls (absent, null, explicit manual with its revoke, system rule share, non-system revoke of that share). The dogfood file pins six refused shapes through the real route, three controls and the generic create door. The two removed tests pinned the accepting branch the rule removes; the manual upsert (one row on a repeated grant) stays pinned by the earlier "upserts on second call" test and the coexistence test.

Findings:

  • S1 (should-fix) — The disposition of shares stored before this head is declared only by implication. A row of a non-manual kind that a non-system caller wrote before the fix stays stored and stays in force, and the changeset's "no stored row changes" does not tell an operator that such rows may exist or what to do about them. Whether that sentence belongs in the public changeset or in the lane's own advisory is the security lane's call; it should exist in one of them before this lands. Detail is in the seat's private notes, not here.
  • S2 (should-fix) — The published contract and the SDK still state less than the tree does. ISharingService.grant's jsdoc in packages/spec/src/contracts/sharing-service.ts enumerates the non-system refusals and does not carry this one, and shares.grant in packages/client/src/index.ts still types both fields as free strings. The PR body names the client half as a separate change and files no issue for it; the spec half is not named at all. File the follow-up (one issue covering both) so the typed surface does not go on offering a call the service always refuses.
  • N1 (nit) — The docs sentence, the changeset and the new jsdoc name "sharing-rule, team and system paths" as writers of non-manual shares. In this tree the rule evaluator is the only such writer; no team or inherited path writes a share. "The platform's own paths under a system context" says what is true without naming writers that do not exist.
  • N2 (nit) — The refusal judges input.source and input.sourceId in a helper, while the write uses values read from the input at other points. Passing the helper the values that are written would bind the check to the write by construction.
  • N3 (nit) — No test names a non-system caller that holds the widest non-system authority (Modify All, platform administrator). The check precedes authorization, so the answer is the same by construction; a named control would keep it so.

② Semver level

@objectstack/plugin-sharing: patch is the level AGENTS.md prescribes: Metadata-protocol: none takes patch, and a non-protocol breaking change ships patch and keeps its BREAKING banner and ADR-0087 disposition, both present. No other package is moved by the diff (packages/rest, packages/spec and packages/client are not edited), so no other changeset is owed.

CI at this head, first read by the reviewer at 2026-11-15T16:56Z: 65 check-runs; 30 success, 25 skipped, 9 IN PROGRESS (Test Core 1/8 to 8/8, Type Check · workspace), 0 failed, 1 cancelled (a superseded Check Changeset run; three later runs of it are green). Green so far includes Check Changeset, Lint and Repo Gates, Lint · PM dispatch-gates, Build Core, Type Check source and consumer gates, Spec property liveness, the queue guard. The Dogfood Regression Gate job is green but its three shards are SKIPPED on this head, so the new dogfood file has no CI run here; its evidence is the implementer's local battery reported in the PR body, which this review did not re-run.

This PASS is rendered while checks are still running. The seat must wait for Test Core and Type Check · workspace to finish green before acting on it; a red there voids nothing in this record but blocks the landing.

③ Boundary flags

  • No governed path and no published schema in the diff; the face is the declared narrowing alone.
  • packages/rest is covered by the service rule and not edited; its behaviour change (400 on the grant route) is declared in the changeset under the plugin's name.
  • Security discipline: this record stays at the rule layer. Nothing here describes a mechanism; the notes that do are private to the seat.
  • The generic-door closure for the share object rests on declarations outside this diff (ADR-0103); this review read them and did not review them.

④ Design judgment

The narrowing against the published spec on main: it makes the spec's own statement real rather than taking a declared capability away. The contract already describes grant as "Create or upsert a manual share row" and manual share CRUD as what the method exposes; the share object's own header says manual rows are what a user creates through the route and rule rows are what the evaluator materialises; ADR-0111 D4 and D7 treat every non-manual kind as evaluator-owned (not manually revocable, coexisting by kind). The two input fields stay on GrantShareInput because the system path uses them. A consumer loses only a call the contract never described as theirs.

Refuse over coerce is the right arm for this rule: a coerced grant would answer 201 for a request whose stated kind was not honoured, which AGENTS.md's silent-degradation test forbids; the refusal is loud, typed, carries the remedy, and costs the refused caller nothing.

sharing-service.ts against the contract it implements: agrees. The check sits on the non-system branch only, ahead of the posture and authorization pre-flights, and the system branch is byte-unchanged. Placement in the service rather than the route is correct, since the service is the one chokepoint every present and future non-system caller passes.

No must-fix. Two should-fix (S1, S2), three nits.

Implemented-by: claude/direct-share-grant-is-manual
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#1 · sunhaolin · session_017xRBcT1w3zpekijraHJE4f

席位核对

ACCEPT at Head-sha: 6e8e34751d43a724f0f529a225e69954cad46f5a (2026-11-15T17:39Z).

  • Shape:
    • No-card order from the security#1 seat.
    • Not governed.
    • Clause-②: no (narrowing), BREAKING, patch on @objectstack/plugin-sharing, ADR-0087 marker not-required (no-migration-prescription). Metadata-protocol: none was confirmed by the review. The title carries !.
  • Rule: a share a non-system caller grants is always a manual share. Any other kind, or any rule identifier, is refused 400 VALIDATION_FAILED before any read or write. The platform's own paths under a system context are unchanged.
  • Gates:
    • CI on this head: 41 success, 25 skipped, 0 failed. All eight Test Core shards and Type Check · workspace are green, which is the condition the review set. One superseded Check Changeset run was cancelled.
    • Locally: plugin-sharing Tests 1537 passed, and 100 of 100 derived gate families exited 0. The ablation was red, with 9 unit and 6 dogfood cases, and was restored.
    • Dogfood battery on this head: Tests 3969 passed | 42 skipped (4011), no failures.
  • Review: review#2 at CONTRACT_REVIEW_TIER: PASS 6898513749. No must-fix.
  • Accepted deviations:
    • N1: the prose names "rule, team and system paths" where the rule evaluator is today's only writer.
    • N2: the check reads the input fields rather than the values written.
    • N3: there is no named control for the widest non-system authority. The check runs before authorization, so the answer is the same by construction.
  • Landing: through the merge queue, by the seat.

Implemented-by: os-dev (security#1 order, session_017xRBcT1w3zpekijraHJE4f) · Reviewed-by: review#2 (session_01L9qibxTeW8xHnxoHxWNHWW).

@objectstack-fleet objectstack-fleet Bot removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 15, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 17:40
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43745618355 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (6/8) — 失败步骤: Run this shard's tests

    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-02-28: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/scenarios:test:  FAIL  test/runner/run-date.test.ts > every dated card, rebased onto each run date > run on 2028-03-31: today is the run date, every date moves as the card's rebase says, 
      ↳ 失败原因: @objectstack/scenarios:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 10 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 5d01679 Nov 15, 2026
70 of 71 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/direct-share-grant-is-manual branch November 15, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation domain:server Domain lane — seat card indexed by label:pm:seat size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants